package first_assignment;

import java.util.Vector;
import java.lang.String;

import first_assignment.Consts_1st.*;

/**
 * a wrapper class for running and testing project functionality.
 * 
 * @author Peretz Oded, Castel Maayan, Farchy Ofir.
 */
public class MainApp_1st 
{
	private static Vector<Movie> mc = new Vector<Movie>(Consts_1st.M);
	private static Vector<Movie> secondary_mc = new Vector<Movie>(Consts_1st.M / 2);
	private static MovieCollection movies;
	
	
	public static void main(String[] args) 
	{
		//Initialization of a dummy movie collections
		for (Integer i=0; i<Consts_1st.M; ++i) {
			mc.add(i.intValue(), new Movie(0, i.toString()));
		}
		for (Integer i=0; i<Consts_1st.M/2; ++i) {
			secondary_mc.add(i.intValue(), new Movie(0, "new-"+i.toString()));
		}
		
		// print random 20 movies from original collection.
		movies = new MovieCollection(mc);
		for (int i = 0 ; i < 100000 ; i++)
		{
			movies.PrintRandomMovie();
		}
		movies.PrintDistArray();
		
		// modify the collection.
		movies.NewDay(secondary_mc);
		
		// print random 20 movies from original collection.
		for (int i = 0 ; i < 100000 ; i++)
		{
			movies.PrintRandomMovie();
		}
		movies.PrintDistArray();
	}

}
